<?php

class changes
{
	/**
	 * Instance of the changes object.
	 *
	 * @var object
	 */
	private static $instance;
	public $changed = false;
	
	private function __construct() { }

	/**
	 * Returns instance of changes.
	 * 
	 * Returns the current instance, or creates and returns it
	 * if it doesn't exist yet.
	 *
	 * @return object
	 */
	public static function get_instance() {
		if (self::$instance === null) {
			self::$instance = new self;
		}
		return self::$instance;
	}
	
	public function mark($mode)
	{
		$this->changed = true;
		$this->$mode = true;
	}
}

?>